<?php 

$c = 1;
$cl = "";
foreach ($system['colors'] as $color){
	$cl .= "		<input type='radio' name='color' value='$color' ". ($c == 1 ? "checked" : "")."><div style='display:inline-block; width:30px; height:30px; background-color:$color;'>.</div> - ";
	$c++;
}

$content = "
<div style='width:50%; min-width:400px; margin: 0 auto; display:inline-block; background-color:white; padding:20px; border-radius:10px;'>
	<h1>".$loc_string['category_add_title']."</h1>

	<form action='action.php' method='post' enctype=\"multipart/form-data\">
		<input type='hidden' name='mode' value='addchat'>
		".$loc_string['category_form_name']."<br>
		<input type='text' name='name' class='textinput'><br>
		<br>
		".$loc_string['category_form_description']."<br>
		<input type='text' maxlength=\"20\" name='desc'  style='color: #0078D7; width:80%; height:30px; text-align:center; font-size:20px; border:0px; border-right:1px solid black;border-bottom:1px solid black;'><br>
		<br>
		".$loc_string['category_form_image']."<br>
		<input type='file' name='picture' accept=\"image/*\"><br>
		<br>
		".$loc_string['category_form_bgcolor']."<br>
		$cl
		<br>
		<br>
		".$loc_string['category_form_pass']." <small>(".$loc_string['category_form_optional'].")</small><br>
		<input type='password' name='pass' style='color: #0078D7; width:80%; height:30px; text-align:center; font-size:20px; border:0px; border-right:1px solid black;border-bottom:1px solid black;'><br>
		<br><br>
		<input type='submit' class='button' value='".$loc_string['send_button']."'>
	</form>
</div>
";
		
echo renderPage($content);
        